import Layout from "@/page/index/index.vue";

const parentPath = "/userProc"
const modelParentPath = "/modelDeployment"
const startActPath = "start"
const procDetailActPath = "procDetail"
const authActPath = "taskAuth"
const taskDetailPath = "taskDetail"

const deploymentHistory = "deploymentHistory"

const paths = {
    startPath: parentPath + "/" + startActPath,
    procDetailPath: parentPath + "/" + procDetailActPath,
    authPath: parentPath + "/" + authActPath,
    deploymentHistory: modelParentPath + "/" + deploymentHistory,

}
const names = {
    procModelDeploymentHistory: "procModelDeploymentHistory",
    taskDetail: "taskDetail",
}
const routes = {}
routes.paths = paths
routes.names = names
routes.routes = [
    {
        path: modelParentPath,
        component: Layout,
        redirect: modelParentPath + "/" + deploymentHistory,
        children: [
            {
                path: deploymentHistory + "/:modelKey/:modelName",
                name: names.procModelDeploymentHistory,
                meta: {
                    props: {
                        labelKey: 'modelName',
                    },
                },
                component: () => import("@/views/start/activiti/model/deploymentHistory.vue")
            },
        ]
    },
    {
        path: parentPath,
        component: Layout,
        redirect: parentPath + "/" + startActPath,
        children: [
            {
                path: startActPath,
                name: '启动流程',
                component: () => import("@/views/start/activiti/myAct/pageStartProc.vue")
            },
            {
                path: procDetailActPath + "/:actBusinessId/:title",
                name: '流程详情',
                meta: {
                    props: {
                        labelKey: 'title',
                    },
                },
                component: () => import("@/views/start/activiti/myAct/pageProcDetail.vue")
            },
            {
                path: authActPath + "/:taskId",
                name: '办理流程任务',
                component: () => import("@/views/start/activiti/myAct/pageProcTaskAuth.vue")
            },
            {
                path: taskDetailPath + "/:taskId/:title",
                name: names.taskDetail,
                meta: {
                    props: {
                        labelKey: 'title',
                    },
                },
                component: () => import("@/views/start/activiti/myAct/pageProcTaskDetail.vue")
            },

        ]
    },
]
export default routes
